<template>
	<view class="goods_list">
		<view class="goods_item" v-for="item in goods" :key="item.id" @click="navigator(item.id)">
			<image src="../../static/phone/phone.jpg" mode=""></image>
			<view class="goods_price">
				<text>￥{{item.sell_price}}</text>
				<text>￥{{item.market_price}}</text>
			</view>
			<view class="goods_title">
				{{item.title}}
			</view>
		</view>
	</view>
</template>

<script>
	export default{
		data(){
			return {
				
			}
		},
		props:["goods"],
		methods:{
			navigator(id){
				this.$emit('goodsItemClick',id)
			}
		}
	}
</script>

<style lang="scss">
	.goods_list{
		padding: 0 15rpx;
		display: flex;
		justify-content: space-between;
		flex-wrap: wrap;
		margin-bottom: 90rpx;
		.goods_item{
			padding:15rpx;
			background: #fff;
			width: 355rpx;
			/* height: 640rpx; */
			margin: 10rpx 0;
			box-sizing: border-box;
			image{
				width: 85%;
				height: 150px;
				display: block;
				margin: auto;
			}
			.goods_price{
				color: #b50e03;
				font-size: 36rpx;
				margin: 20rpx 0 5rpx 0;
				text:nth-child(2){
					color: #ccc;
					font-size: 28rpx;
					margin-left: 17rpx;
					text-decoration: line-through;
				}
			}
			.goods_title{
				font-size: 30rpx;
				line-height: 50rpx;
				padding-bottom: 15rpx;
				padding-top: 10rpx;
			}
		}
		
	}
</style>
